<T:ViewBase x:Class="WPFExcelReport.TYLGB14"
                    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
                    xmlns:ucd="clr-namespace:ReflectionStudio.Controls;assembly=ReflectionStudio.Controls"   
                    xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
                    xmlns:me="clr-namespace:WPFExcelReport"  
                    xmlns:T="clr-namespace:WPFExcelReport;assembly=IntexBL" 
                    xmlns:ex="clr-namespace:WPFExcelReport.Controls;assembly=ExControls"    
                    xmlns:Localization="clr-namespace:Localization;assembly=Localization"  
                    Name="TV"
                    Background="White"    
                    Loaded="Window_Loaded"
     >
    <T:ViewBase.Resources>
        <CollectionViewSource  x:Key="vwMaster"/>
        <ucd:Divideby10  x:Key="d10"/>
        <ucd:BoolToVisibilityConverter  x:Key="bv"/>
        <ucd:Divideby100  x:Key="d100"/>
        <ucd:Divideby1000  x:Key="d1000"/>
        <ucd:PNumConverter  x:Key="pnum"/>
        <ucd:GB2312Convert8859P1  x:Key="gb2312"/>
    </T:ViewBase.Resources>
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"></RowDefinition>
            <RowDefinition Height="1*"></RowDefinition>
        </Grid.RowDefinitions>
        <StackPanel >
            <WrapPanel Height="34">
                <Label Content="{Binding Source={Localization:Translate Word=库}}"    Width="Auto" Margin="1,0,0,0"     FontSize="18"  Foreground="#FF141111" />
                <TextBox Text="{Binding LO,ElementName=TV}"  Width="30" Margin="0,0,0,0"  HorizontalAlignment="Left" Background="Pink"  
                         KeyUp="txtLO_KeyUp" CharacterCasing="Upper" MaxLength="20"   Foreground="#FF141111" />
                <Label Content="{Binding Source={Localization:Translate Word=库区}}"    Width="Auto" Margin="1,0,0,0"     FontSize="18"  Foreground="#FF141111" />
                <TextBox Text="{Binding LB,ElementName=TV}" Width="30" Margin="0,0,0,0"  HorizontalAlignment="Left" Background="Pink"  
                         KeyUp="txtLO_KeyUp" CharacterCasing="Upper" MaxLength="20"   Foreground="#FF141111" />
                <TextBlock Width="Auto"  VerticalAlignment="Center">批号:</TextBlock>
                <TextBox Text="" Name="txtART" Width="151" Margin="5,0,0,0"  HorizontalAlignment="Left" Background="Pink"  
                         KeyUp="txtLO_KeyUp" CharacterCasing="Upper" MaxLength="20"   Foreground="#FF141111" />
                <Label Content="{Binding Source={Localization:Translate Word=日期从}}"   HorizontalAlignment="Left" Margin="10,0,0,0"  Width="Auto" FontSize="16" />
                <DatePicker Height="25" HorizontalAlignment="Left" Margin="0,2,0,0"    Panel.ZIndex="4"
                            Text="{Binding FROMDATE,ElementName=TV}" SelectedDateChanged ="FROM_DATE_SelectedDateChanged"  Width="126" />
                <Label Content="{Binding Source={Localization:Translate Word=到}}" Height="28" HorizontalAlignment="Left" Margin="10,0,0,0"   Width="Auto" FontSize="16" />
                <DatePicker Height="25" HorizontalAlignment="Left" Margin="0,0,0,0"   VerticalAlignment="Center" Panel.ZIndex="5"
                                  Text="{Binding ENDDATE,ElementName=TV}"    SelectedDateChanged ="END_DATE_SelectedDateChanged" Width="122" />
                <Button Content="{Binding Source={Localization:Translate Word=查询}}" Height="33" Margin="10,0,0,0"   Width="96" Panel.ZIndex="9"
                        Click="QueryCommand"/>
                <Button Content="{Binding Source={Localization:Translate Word=导出}}" Height="33" Margin="10,0,0,0"   Width="100" Panel.ZIndex="10"
                    Click="PrintCommand"   />
            </WrapPanel>
            
        </StackPanel>

        <DataGrid  Grid.Row="1" Grid.Column="0"
                   Grid.RowSpan="2"
                   VerticalAlignment="Top"  
                   AutoGenerateColumns="False"
                   EnableRowVirtualization="False"
                   VerticalScrollBarVisibility="Auto"
                   HorizontalScrollBarVisibility="Auto"
                   HeadersVisibility="Column"
                   Name="dlgMaster"
                   ItemsSource="{Binding Source={StaticResource vwMaster}}" 
                   IsSynchronizedWithCurrentItem="True" 
                    >
            <DataGrid.Columns>
                <!--GPGART,GPGVAR,GPGFARBE,GPSPPART,GPFBPART,GPZWPART,GABLO,GABLB,GABBUCHDAT,INQTY,PRODIN ,OUTQTY, ADJQTY-->              
                <DataGridTextColumn Header="{Binding Source={Localization:Translate Word=编号}}" Binding="{Binding GPGART}" Width="Auto"/>
                <DataGridTextColumn Header="{Binding Source={Localization:Translate Word=产地}}" Binding="{Binding GPGVAR}" Width="Auto"/>
                <DataGridTextColumn Header="{Binding Source={Localization:Translate Word=色号}}" Binding="{Binding GPGFARBE,Converter={StaticResource ResourceKey=gb2312 }}" Width="Auto"/>
                <DataGridTextColumn Header="{Binding Source={Localization:Translate Word=批号}}" Binding="{Binding GPSPPART,Converter={StaticResource ResourceKey=gb2312 }}" Width="Auto"/>
                <DataGridTextColumn Header="{Binding Source={Localization:Translate Word=缸号}}" Binding="{Binding GPFBPART,Converter={StaticResource ResourceKey=gb2312 }}" Width="Auto"/>
                <DataGridTextColumn Header="{Binding Source={Localization:Translate Word=送货数}}" Binding="{Binding GPZWPART}" Width="Auto"/>
                <DataGridTextColumn Header="{Binding Source={Localization:Translate Word=库}}" Binding="{Binding GABLO}" Width="Auto"/>
                <DataGridTextColumn Header="{Binding Source={Localization:Translate Word=库区}}" Binding="{Binding GABLB}" Width="Auto"/>
                <DataGridTextColumn Header="{Binding Source={Localization:Translate Word=操作日期}}" Binding="{Binding GABBUCHDAT}" Width="Auto"/>
                <DataGridTextColumn Header="{Binding Source={Localization:Translate Word=入库包数}}" Binding="{Binding RINQTY}" Width="Auto"/>
                <DataGridTextColumn Header="{Binding Source={Localization:Translate Word=入库数}}" Binding="{Binding INQTY}" Width="Auto"/>
                <DataGridTextColumn Header="{Binding Source={Localization:Translate Word=车间转入包数}}" Binding="{Binding RPRODIN}" Width="Auto"/>
                <DataGridTextColumn Header="{Binding Source={Localization:Translate Word=车间转入}}" Binding="{Binding PRODIN}" Width="Auto"/>
                <DataGridTextColumn Header="{Binding Source={Localization:Translate Word=出库包数}}" Binding="{Binding ROUTQTY}" Width="Auto"/>
                <DataGridTextColumn Header="{Binding Source={Localization:Translate Word=出库数}}" Binding="{Binding OUTQTY}" Width="Auto"/>
                <DataGridTextColumn Header="{Binding Source={Localization:Translate Word=调整包数}}" Binding="{Binding RADJQTY}" Width="Auto"/>
                <DataGridTextColumn Header="{Binding Source={Localization:Translate Word=调整数}}" Binding="{Binding ADJQTY}" Width="Auto"/>
                <DataGridTextColumn Header="{Binding Source={Localization:Translate Word=入库总包数}}" Binding="{Binding RINTOT}" Width="Auto"/>
                <DataGridTextColumn Header="{Binding Source={Localization:Translate Word=入库总数}}" Binding="{Binding INTOT}" Width="Auto"/>
            </DataGrid.Columns>
        </DataGrid  >
    </Grid>

</T:ViewBase>
